I. Field
The present disclosure relates generally to the field of video decoding and, more specifically, to techniques for optimizing Context-based Adaptive Binary Arithmetic Coding (CABAC) bitstream decoding.
II. Background
H.264/AVC has two different entropy coding modes to generate the bitstream. AVC represents adaptive video coding. One coding mode is Context-based Adaptive Variable Length Coding (CAVLC), and the other coding mode is Context-based Adaptive Binary Arithmetic Coding (CABAC). CAVLC is similar to other variable length coding (VLC) schemes. Each syntax element is decoded from one or more integer number of bits.
CABAC decodes syntax elements very differently. Each syntax element can be decoded conceptually in two steps. In the first step, CABAC decodes one or more binary symbols using an adaptive binary arithmetic decoder. In the second step, a debinarization process is performed to reconstruct the value of syntax element, and this value is used in the remaining decoding steps of a video decoder. Depending on a bypass flag and context index, a binary symbol is decoded using one of three different decoding processes defined in the adaptive binary arithmetic coder, namely DecodeDecision, DecodeBypass, and DecodeTerminate.
In DecodeDecision, a binary symbol is decoded in the context of the information already decoded from the bitstream. In addition, the probability model of decoding the next binary symbol of the same category is updated based on the value of the binary symbol just decoded. In DecodeBypass, the symbol is decoded without referring to other information already decoded. In addition, there is no need to maintain a context model after the symbol is decoded. DecodeTerminate is similar to DecodeBypass, except that the process is so defined that decoding a symbol of one value consumes only a fractional amount of bits, while decoding a symbol of the other value consumes significantly more bits.
Since decoding a symbol, especially using the process DecodeDecision, requires several steps of serial operations, it is very difficult to speed up the overall CABAC decoding process. This has been a challenge in implementing the high-definition (HD) video decoder. Some compressed frames are too large. The CABAC decoder can take significantly more time to finish than other decoding stages. Thus, the overall performance of the decoder is affected.
The encoding process is the inverse of the decoding process. A CABAC encoder performs binarization to convert each syntax element into one or several binary symbols, and each binary symbol is encoded using one of three binary arithmetic coding processes, namely EncodeDecision, EncodeBypass and EncodeTerminate which correspond to DecodeDecision, DecodeBypass and DecodeTerminate, respectively.
One approach to the problem mentioned above is to transcode the CABAC bitstream into a bitstream without CABAC in the first stage and to perform the decoding of this non-CABAC bitstream and other processing steps in the second stage. Buffering is generally needed between these two stages. In the first stage, the operations normally involve decoding the values of the syntax elements from the CABAC bitstream and re-encoding the syntax elements using another entropy coding scheme, such as H.264 CAVLC or MPEG-2 like VLC encoder.
One problem with this transcoding approach is the complexity associated with the transcoding operations. The complete CABAC decoder essentially needs to be implemented with the overhead of another VLC encoder and VLC decoder. In addition, the compression efficiency of the VLC encoder may not be satisfactory to minimize the additional traffic.
There is therefore a continuing need for techniques for optimizing the Context-based Adaptive Binary Arithmetic Coding (CABAC) bitstream decoding.